import socket
import socketserver
import time
from multiprocessing import Process, Queue,Value,Manager
from multiprocessing.sharedctypes import Array
import ctypes
from typing import Tuple
from mss.tools import to_png
import cv2
#import lzo
import mss
import numpy as np
from PIL import Image
from ctypes import c_byte, c_char_p, c_int
import logging


time_base = time.time()

class ScreenFrame:
    def __init__(self, _width, _heigth, _area_list) -> None:
        self._width = _width
        self._heigth = _heigth
        self._area_list = np.array(_area_list)
        self._area_row = self._area_list.shape[0]
        logging.info("area shape:{}".format(self._area_row))
        self._area_row_index = 0xffffffff
        self._frame = []
        self._area_row_last = 0

    # frame shape like (160, 128, 2)
    def setframe(self, frame):
        self._frame = frame
        # self._area_row_index = 0

    def getframe(self):
        if self._area_row_index >= self._area_row:
            self._area_row_index = 0# return True, self._frame
        x1 = self._area_list[self._area_row_index][0]
        y1 = self._area_list[self._area_row_index][1]
        x2 = self._area_list[self._area_row_index][2]
        y2 = self._area_list[self._area_row_index][3]
        area_frame = self._frame[y1:y2, x1:x2]
        self._area_row_last = self._area_list[self._area_row_index]
        self._area_row_index += 1
        return False, area_frame
    
    def getarea(self):
        return self._area_row_last


class GeneralProtocol:
    def __init__(self, magic) -> None:
        self._magic = magic
        self._state = 0

        self._addr = 0
        self._cmd = 0
        self._length = 0
        self._data = []

        self._cb = 0

    def _analyze_byte(self, byte):
        if self._state == 0:
            if byte == self._magic:
                self._state = 1
            else:
                self._state = 0
            self._length = 0
            self._cmd = 0
            self._data = []
        elif self._state == 1:
            self._addr = byte
            self._state = 2
        elif self._state == 2:
            self._cmd = byte
            self._state = 3
        elif self._state == 3:
            self._length = byte
            self._state = 4
        elif self._state == 4:
            self._length |= ((byte&0xff)<<8)
            if self._length == 0:
                if self._cb != 0:
                    self._cb(self._addr, self._cmd, self._data, self._length)
                self._state = 5
            else:
                self._state = 0
        elif self._state == 5:
            self._data.append(byte)
            if len(self._data) >= self._length:
                if self._cb != 0:
                    self._cb(self._addr, self._cmd, self._data, self._length)
            self._state = 0
            return True
        return False

    def analyze(self, bytes):
        for byte in bytes:
            self._analyze_byte(byte)

    # magic 0xa1
    def packet(self, addr, cmd, byte_list):
        sendbytes = [self._magic, addr, cmd] + byte_list
        return sendbytes.tobytes()


class miniLZO:
    def __init__(self, input_len):
        self._lzo_lib = ctypes.cdll.LoadLibrary('./miniLZO.dll')
        self._is_init = self._lzo_lib.lzo_init()
        self.input_len = input_len
        self.input_buff_size = int(self.input_len * 10)#int(25600*2)
        
    def is_init(self):
        return self._is_init

    def _minilzo_compress_part(self, src_bytes):
        src_bytes_len = len(src_bytes)
        input = c_byte * int(self.input_len * 10)#25600#self.input_buff_size
        input_data = input()
        for i in range(src_bytes_len):
            input_data[i] = src_bytes[i]
    
        wrkmem = c_byte * self.input_buff_size
        wrkmem_data = wrkmem()
        out = c_byte * self.input_buff_size
        out_data = out()
    
        outlen = c_int * 1
        outlen_data = outlen()
        r = self._lzo_lib.lzo1x_1_compress( input_data, self.input_len, out_data, outlen_data, wrkmem_data)
        # logging.info("r={}".format(r))
        # cbytes 2 bytes
        return outlen_data[0], np.frombuffer(out_data, dtype=np.ubyte).tobytes()[:outlen_data[0]]
        
    def minilzo_compress(self, src_bytes):
        output = b''
        output_locate = []
        slice_len = self.input_len
        for i in range(0,len(src_bytes), slice_len):
            # logging.info("i=", i)
            olen, odata = self._minilzo_compress_part(src_bytes[i:i+slice_len])
            output += odata
            output_locate.append(olen)
            # logging.info(len(output))
        return output_locate, output
        
    def _minilzo_decompress_part(self, src_bytes):
        src_bytes_len = len(src_bytes)
        input = c_byte * int(self.input_len * 10)#25600#self.input_buff_size
        input_data = input()
        for i in range(src_bytes_len):
            input_data[i] = src_bytes[i]
    
        out = c_byte * int(self.input_buff_size * 4)
        out_data = out()
        out_len = c_char_p
    
        outlen = c_int * 1
        outlen_data = outlen()
        r = self._lzo_lib.lzo1x_decompress(input_data, src_bytes_len, out_data, outlen_data, 0)
        logging.info("r={} len={}".format(r, outlen_data[0]))
        # cbytes 2 bytes
        return np.frombuffer(out_data, dtype=np.ubyte).tobytes()[:outlen_data[0]]
        
    def minilzo_decompress(self, src_bytes, locate_list):
        output = b''
        cnt = 0
        for i in locate_list:
            output += self._minilzo_decompress_part(src_bytes[cnt:cnt+i])
            cnt += i
        return output


    

class MyTCPHandler(socketserver.BaseRequestHandler):
    def handle(self):
        try:
            while True:
                self.data=self.request.recv(1024)
                logging.info("{} send:".format(self.client_address),self.data)
                if not self.data:
                    logging.info("connection lost")
                    break
                self.request.sendall(self.data.upper())
        except Exception as e:
            logging.info(self.client_address,"连接断开")
        finally:
            self.request.close()

    def setup(self):
        logging.info("before handle,连接建立：",self.client_address)

    def finish(self):
        logging.info("finish run  after handle")


#[[0,0,63,63],[64,0,127,63],[0,64,63,127],[64,64,127,127],[128,0,159,127]]

# [
#     [0,0,32,32],[32,0,64,32],[64,0,96,32],[96,0,128,32],[128,0,160,32],
#     [0,32,32,64],[32,32,64,64],[64,32,96,64],[96,32,128,64],[128,32,160,64],
#     [0,64,32,96],[32,64,64,96],[64,64,96,96],[96,64,128,96],[128,64,160,96],
#     [0,96,32,128],[32,96,64,128],[64,96,96,128],[96,96,128,128],[128,96,160,128],
# ]

class ScreenStream(miniLZO, ScreenFrame):
    def __init__(self, ip_str, port_int, screen_area, show_area, show_area_slice_list) -> None:
        self._ip = ip_str
        self._port = port_int
        self._screen_area = screen_area
        self._show_area = show_area
        self._frame_buffer = 0
        self._frame_area = 0
        self._frame_buffer_lzo = 0
        miniLZO.__init__(self, (show_area_slice_list[0][2] - show_area_slice_list[0][0]) * (show_area_slice_list[0][3] - show_area_slice_list[0][1]) * 2)
        ScreenFrame.__init__(self, self._show_area[0], self._show_area[1], show_area_slice_list)
        
    def getSendPacket(self):
        self.setframe(self.grab_screen_to_buffer(self._screen_area[0], self._screen_area[1], self._screen_area[2], self._screen_area[3]))
        need_reflush, self._frame_buffer = self.getframe()
        self._frame_area = self.getarea()
        # if need_reflush == True:
        #     self.setframe(self.grab_screen_to_buffer(self._screen_area[0], self._screen_area[1], self._screen_area[2], self._screen_area[3]))
        #     need_reflush, self._frame_buffer = self.getframe()
        #     self._frame_area = self.getarea()
        #     if need_reflush == True:
        #         logging.info("Frame Error!!!!!!!!!!!!!!!!")
        logging.info("area:{}".format(self._frame_area))
        _, self._frame_buffer_lzo = self.minilzo_compress(self._frame_buffer.tobytes())
        logging.info("compress len:{}".format(len(self._frame_buffer_lzo)))

    def loop(self):
        # 1. 创建套接字 socket
        if True:
            tcp_server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) #SOCK_DGRAM #SOCK_STREAM
            # 2. 绑定本地信息 bind
            tcp_server_socket.bind((self._ip, self._port))
            # 3. 让默认的套接字由主动变为被动 listen
            tcp_server_socket.listen(128)
            logging.info("启动TCP服务器\r\n" + f'启动在{self._ip}:{self._port}上')
            # 4. 等待客户端的链接 accept
            logging.info("等待客户端的链接\r\n")
            new_client_socket, client_addr = tcp_server_socket.accept()
            logging.info(f'当前链接:{client_addr}')

            self.getSendPacket()
            start_time = time.time()
            while True:
                s = time.time()
                recv = new_client_socket.recv(1)
                logging.info("recv:{} {}".format(recv,time.time()-time_base))
                # recv, addr = tcp_server_socket.recvfrom(1)
                # logging.info("recv:{} from {} {}".format(recv, addr, time.time()-time_base))
                if recv == b'\x41':
                    # 客户端就绪，发送头数据
                    logging.info("ready send header {}".format(time.time()-time_base))
                    start_time = time.time()
                    header = len(self._frame_buffer_lzo)
                    # header = package_header(header)

                    # len len16 len24 len32 x1l x1h y1l y1h x2l x2h y2l y2h checksuml checksumh
                    head_list = [header&0xff, (header>>8)&0xff, (header>>16)&0xff, (header>>24)&0xff]
                    head_list += [self._frame_area[0]&0xff, (self._frame_area[0]>>8)&0xff]
                    head_list += [self._frame_area[1]&0xff, (self._frame_area[1]>>8)&0xff]
                    head_list += [self._frame_area[2]&0xff, (self._frame_area[2]>>8)&0xff]
                    head_list += [self._frame_area[3]&0xff, (self._frame_area[3]>>8)&0xff]
                    cs = check_sum(head_list)
                    head_list += [cs&0xff, (cs>>8)&0xff]

                    new_client_socket.sendall(bytes(head_list))
                    # tcp_server_socket.sendto(bytes(head_list), addr)
                    end_time = time.time()
                    cost = end_time - start_time
                    logging.info("done, cost:{}".format(cost, time.time()-time_base))
                elif recv == b'\x02':
                    # 客户端准备头部接收完成，发送帧数据
                    # new_client_socket.sendall(sf.getframe().tobytes())
                    #frame_buffer = grab_screen_to_buffer(0, 0, 1920, 1080)
                    # frame_buffer = grab_screen_to_buffer(0, 0, 160, 128)
                    # logging.info(len(frame_buffer.tobytes()))
                    logging.info("ready send frame data {}".format(time.time()-time_base))
                    new_client_socket.sendall(self._frame_buffer_lzo)
                    # tcp_server_socket.sendto(self._frame_buffer_lzo, addr)
                    logging.info("done {}".format(time.time()))
                    logging.info("to ready next {}".format(time.time()-time_base))
                    self.getSendPacket()
                    logging.info("done {}".format(time.time()-time_base))
                elif recv == b'\x01':
                    # 客户端准备帧数据接收完成，等待客户端就绪
                    # logging.info("客户端准备帧数据接收完成，等待客户端就绪")
                    end_time = time.time()
                    cost = end_time - start_time
                    logging.info("Backend FPS:{:.2f} {}".format(1.0 / cost, time.time()-time_base))

    ## grab screen by left top width height
    def grab_screen_to_buffer(self, l, t, w, h):
        monitor = {"top": t, "left": l, "width": w, "height": h}
        with mss.mss() as sct:
            sct_frame = sct.grab(monitor)
            img = np.array(sct_frame)
            img = cv2.resize(img, dsize=(self._show_area[0], self._show_area[1]))
            img_rgb565 = cv2.cvtColor(img, cv2.COLOR_BGR2BGR565)
            img_rgb565 = img_rgb565[...,::-1]
            return img_rgb565

            # data = img_rgb565
            # logging.info("{input data len:\n", len(data), "data[0:100]:", data[0:100], "}")
            # st = time.time()
            # logging.info("start time", time.time())
            # barray_locate, barray = self.minilzo_compress(data.tobytes())
            # logging.info("used time", time.time(), time.time()-st)
            # return barray
        
            # img_rgb565_bytes = img_rgb565.tobytes()
            # with open("write.c", "wb") as f:
                # f.write(img_rgb565_bytes)
                
            # logging.info(img_rgb565_bytes)
            # logging.info("string:")
            # img_rgb565_str = ""
            # for byte in img_rgb565_bytes:
                # img_rgb565_str += str(hex(byte)) + ','
            # logging.info(img_rgb565_str)
            # logging.info(img_rgb565_bytes.decode())
            # logging.info("bmp no comporess size:{}",len(img.tobytes()))
            # logging.info("bmp lzo comporess size:{}",len(lzo.compress(img.tobytes(), 9, False)))
            # quality = 60
            # encode_params = [cv2.IMWRITE_JPEG_QUALITY,quality,cv2.IMWRITE_JPEG_PROGRESSIVE,0]
            # retval, img = cv2.imencode(".jpg", img, encode_params)
            
            # with open("write.jpg", "wb") as f:
                # f.write(img.tobytes())
            # img = img[..., ::-1]
            # logging.info("jpg no comporess size:{}",len(img.tobytes()))
            # # logging.info("jpg lzo comporess size:{}",len(lzo.compress(img.tobytes(), 9, False)))
            
            # nparr = np.fromstring(img, np.uint8)
            # img_decode = cv2.imdecode(nparr, cv2.IMREAD_COLOR)
            # cv2.imshow("Image", img_decode)
            # cv2.waitKey(0)        
            return img

def package_header(size):
    data = num_package(size)
    header = ''.join(data).encode() + hex(check_sum(data)).encode()[2:]
    return header

# 校验和
# def check_sum(value):
#     s = 0
#     for d in value:
#         s += ord(d)
#     s = (s & 0xff) + (s >> 16)
#     return ~s & 0xff
def check_sum(value):
    s = 0
    for d in value:
        s += d
    s = (s & 0xff) + (s >> 16)
    return ~s & 0xff

# 打包数字
def num_package(num):
    if num < 100000000:
        li_str = list(str(num))
        result = ['0' for _ in range(8)]
        for index, item in zip(range(len(li_str)), li_str):
            result[-index + len(li_str) - 1] = item
        return result[::-1]
    else:
        return ['9' for _ in range(6)]
            

def grab_screen_to_buffer(name, l, t, w, h):
    monitor = {"top": t, "left": l, "width": w, "height": h}
    with mss.mss() as sct:
        sct_frame = sct.grab(monitor)
        img = np.array(sct_frame)
        img = cv2.resize(img, dsize=(1600, 1000))

        # img_rgb565_bytes = img_rgb565.tobytes()
        # with open("write.c", "wb") as f:
            # f.write(img_rgb565_bytes)
            
        quality = 100#60
        encode_params = [cv2.IMWRITE_JPEG_QUALITY,quality,cv2.IMWRITE_JPEG_PROGRESSIVE,0]
        retval, imgjpg = cv2.imencode(".jpg", img, encode_params)
        
        with open(name+".jpg", "wb") as f:
            f.write(imgjpg.tobytes())

        img_rgb565 = cv2.cvtColor(img, cv2.COLOR_BGR2BGR565)
        img_rgb565 = img_rgb565[...,::-1]
        img_rgb565_bytes = img_rgb565.tobytes()
        with open(name+".c", "wb") as f:
            f.write(img_rgb565_bytes)

def show_array(img_array):
    # nparr = np.fromstring(img_array, np.uint8)
    nparr = np.array(img_array, np.uint8)
    # img_decode = cv2.imdecode(nparr, cv2.IMREAD_COLOR)
    img_decode = cv2.resize(nparr, dsize=(160, 128))
    cv2.imshow("Image", img_decode)
    cv2.waitKey(0)   
    
    
    
def lzo_test(file_name):
    time_base = time.time()
    ml = miniLZO(4096)
    logging.info("miniLZO init {} {}".format(ml.is_init(), time.time()-time_base))
    # data = cv2.imread(file_name)
    with open(file_name, 'rb') as f:
        data = f.read()
    data = np.array(data).tobytes()#[:40960]
    logging.info("input data len:{} data[0:100]:{}".format(len(data),  data[0:100]))
    
    st = time.time()
    # logging.info("start time {}".format(time.time()))
    barray_locate, barray = ml.minilzo_compress(data)
    # logging.info("used time {} {}".format(time.time()-time_base, time.time()-st))
    logging.info("compress out len:{} locate:{} data: {}".format(len(barray), barray_locate, barray[:100]))

    st = time.time()
    # logging.info("start time {}".format(time.time()))
    barray = ml.minilzo_decompress(barray, barray_locate)
    # logging.info("used time {} {}".format(time.time()-time_base, time.time()-st))
    logging.info("decompress out len:{} data:{}".format(len(barray), barray[:100]))

    for i in range(0, len(data)):
        if data[i] != barray[i]:
            logging.info("error data in:{}".format(i))
    
    
if __name__ == '__main__':
    logging.basicConfig(level=logging.DEBUG)
    time.sleep(1)
    
    grab_screen_to_buffer("1", 0,0,2560,1440)
    # show_array(pic1)
    # lzo_test("FFA00613.png")
    # lzo_test("write.jpg")
    lzo_test("1.c")
    # l0 = [49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 50, 140, 68, 54, 59, 81, 49, 232, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 50, 108, 60, 54, 60, 21, 85, 158, 85, 158, 59, 212, 50, 9, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 50, 173, 60, 55, 60, 55, 60, 22, 85, 158, 85, 158, 85, 158, 85, 158, 60, 54, 49, 233, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 50, 206, 52, 55, 52, 55, 52, 55, 51, 246, 77, 158, 77, 158, 77, 158, 77, 158, 77, 158, 68, 21, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 50, 239, 52, 55, 52, 55, 52, 55, 52, 23, 51, 246, 77, 158, 77, 158, 77, 158, 77, 158, 77, 158, 77, 158, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 167, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 166, 43, 49, 52, 23, 52, 23, 52, 23, 52, 23, 52, 22, 51, 213, 77, 126, 77, 126, 77, 126, 77, 126, 77, 126, 77, 126, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 43, 49, 44, 154, 42, 141, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 167, 43, 82, 44, 23, 44, 23, 44, 23, 44, 23, 44, 23, 43, 246, 43, 17, 69, 126, 69, 126, 69, 126, 69, 126, 69, 126, 69, 126, 49, 134, 
    # 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 43, 147, 44, 154, 44, 154, 44, 154, 43, 17, 49, 167, 49, 134, 49, 134, 49, 199, 43, 148, 43, 247, 43, 247, 43, 247, 43, 247, 43, 247, 43, 247, 42, 141, 49, 134, 69, 126, 69, 126, 69, 126, 69, 126, 69, 126, 69, 126, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 43, 115, 44, 122, 44, 122, 44, 122, 44, 122, 35, 181, 41, 200, 41, 199, 35, 148, 43, 214, 43, 246, 43, 246, 43, 246, 43, 246, 43, 246, 42, 10, 49, 134, 49, 134, 69, 126, 69, 126, 69, 94, 69, 126, 69, 126, 69, 126, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 43, 50, 36, 122, 36, 122, 36, 122, 36, 122, 36, 57, 35, 246, 35, 148, 35, 181, 35, 214, 35, 214, 35, 246, 35, 83, 49, 199, 49, 134, 49, 134, 49, 134, 69, 94, 69, 94, 69, 94, 69, 94, 69, 94, 69, 94, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 34, 207, 36, 122, 36, 122, 36, 122, 36, 122, 36, 122, 36, 24, 35, 149, 35, 149, 35, 182, 42, 174, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 61, 94, 61, 94, 61, 94, 61, 94, 61, 94, 61, 94, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 42, 141, 36, 90, 36, 90, 36, 90, 36, 90, 36, 90, 36, 89, 35, 182, 42, 9, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 61, 94, 61, 94, 61, 94, 61, 94, 61, 94, 61, 94, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 42, 43, 27, 247, 28, 90, 28, 90, 28, 90, 28, 90, 28, 90, 28, 90, 42, 43, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 61, 94, 61, 94, 61, 94, 61, 94, 61, 94, 61, 94, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 34, 141, 27, 149, 27, 116, 27, 214, 28, 90, 28, 90, 28, 90, 28, 90, 28, 90, 28, 90, 34, 207, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 61, 62, 61, 62, 61, 62, 53, 62, 61, 62, 61, 62, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 34, 175, 27, 182, 27, 150, 27, 149, 27, 116, 27, 149, 28, 57, 28, 58, 28, 58, 28, 58, 28, 58, 28, 58, 27, 149, 41, 167, 49, 134, 49, 134, 49, 134, 53, 62, 53, 62, 53, 62, 53, 62, 53, 62, 53, 62, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 26, 208, 19, 150, 19, 150, 19, 150, 19, 150, 27, 17, 41, 167, 41, 200, 19, 248, 20, 58, 20, 58, 20, 58, 20, 58, 20, 58, 20, 58, 42, 10, 49, 134, 49, 134, 53, 62, 53, 62, 53, 62, 53, 62, 53, 62, 53, 62, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 26, 208, 19, 150, 19, 149, 19, 150, 34, 174, 49, 166, 49, 134, 49, 134, 41, 167, 19, 182, 20, 25, 20, 58, 20, 25, 20, 58, 20, 25, 20, 58, 34, 142, 49, 134, 53, 30, 53, 62, 53, 30, 53, 62, 53, 30, 53, 62, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 34, 142, 19, 117, 34, 43, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 41, 167, 27, 116, 20, 25, 20, 25, 20, 25, 20, 25, 20, 25, 20, 25, 27, 50, 45, 30, 45, 30, 45, 30, 45, 30, 45, 30, 45, 30, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 166, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 166, 27, 18, 12, 25, 12, 25, 12, 25, 12, 25, 11, 249, 11, 216, 45, 30, 45, 30, 45, 30, 45, 30, 45, 30, 45, 30, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 26, 208, 12, 25, 12, 25, 12, 25, 11, 249, 11, 216, 45, 30, 45, 30, 45, 30, 45, 30, 45, 30, 45, 30, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 26, 175, 11, 249, 11, 249, 11, 249, 11, 183, 36, 254, 36, 254, 36, 254, 36, 254, 36, 254, 43, 148, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 26, 109, 3, 249, 3, 217, 3, 151, 36, 254, 36, 254, 36, 254, 36, 254, 35, 214, 41, 233, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 34, 44, 3, 184, 3, 118, 36, 253, 36, 254, 35, 148, 42, 10, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 34, 142, 19, 83, 35, 18, 41, 200, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 
    # 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 
    # 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 255, 255, 255, 255, 255, 255, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134]
    # l1 = [3, 49, 134, 49, 134, 49, 134, 32, 0, 0, 0, 0, 0, 134, 20, 0, 5, 50, 140, 68, 54, 59, 81, 49, 232, 32, 83, 164, 22, 11, 50, 108, 60, 54, 60, 21, 85, 158, 85, 158, 59, 212, 50, 9, 32, 77, 4, 2, 5, 50, 173, 60, 55, 60, 55, 60, 22, 116, 15, 108, 0, 1, 60, 54, 49, 233, 32, 71, 4, 2, 1, 50, 206, 52, 55, 100, 0, 1, 51, 246, 77, 158, 230, 0, 68, 21, 32, 69, 246, 1, 50, 239, 100, 15, 1, 52, 55, 52, 23, 42, 246, 1, 77, 158, 32, 50, 245, 1, 167, 45, 76, 1, 2, 166, 43, 49, 52, 23, 196, 0, 2, 22, 51, 213, 77, 126, 40, 4, 0, 45, 164, 0, 32, 32, 220, 32, 3, 43, 49, 44, 154, 42, 141, 41, 84, 1, 2, 167, 43, 82, 44, 23, 228, 0, 3, 43, 246, 43, 17, 69, 126, 40, 4, 0, 41, 156, 0, 32, 32, 228, 1, 3, 49, 134, 43, 147, 44, 154, 103, 0, 43, 17, 49, 164, 32, 2, 199, 43, 148, 43, 247, 40, 4, 0, 124, 18, 40, 238, 1, 69, 126, 32, 46, 247, 1, 115, 44, 122, 164, 0, 9, 35, 181, 41, 200, 41, 199, 35, 148, 43, 214, 43, 246, 230, 0, 42, 10, 116, 13, 149, 15, 94, 148, 0, 32, 46, 244, 1, 3, 49, 134, 43, 50, 36, 122, 196, 0, 14, 57, 35, 246, 35, 148, 35, 181, 35, 214, 35, 214, 35, 246, 35, 83, 49, 199, 108, 15, 1, 49, 134, 69, 94, 40, 4, 0, 164, 2, 32, 43, 22, 0, 34, 207, 212, 15, 116, 16, 6, 24, 35, 149, 35, 149, 35, 182, 42, 174, 40, 134, 1, 61, 94, 40, 4, 0, 40, 84, 0, 32, 41, 36, 0, 1, 42, 141, 36, 90, 39, 4, 0, 1, 89, 35, 182, 42, 43, 92, 19, 40, 238, 1, 61, 94, 32, 41, 204, 1, 40, 36, 1, 3, 42, 43, 27, 247, 28, 90, 40, 6, 0, 42, 43, 40, 110, 0, 49, 134, 32, 61, 244, 1, 5, 34, 141, 27, 149, 27, 116, 27, 214, 40, 244, 1, 1, 28, 90, 34, 207, 40, 254, 1, 61, 62, 101, 0, 53, 148, 0, 40, 84, 0, 32, 37, 36, 0, 3, 34, 175, 27, 182, 27, 150, 156, 15, 2, 149, 28, 57, 28, 58, 231, 0, 27, 149, 41, 175, 112, 134, 53, 62, 40, 4, 0, 32, 37, 204, 1, 244, 8, 1, 26, 208, 19, 150, 164, 0, 7, 27, 17, 41, 167, 41, 200, 19, 248, 20, 58, 40, 4, 0, 164, 110, 40, 238, 1, 53, 62, 252, 6, 32, 37, 28, 0, 148, 15, 4, 149, 19, 150, 34, 174, 49, 166, 100, 10, 5, 41, 167, 19, 182, 20, 25, 20, 58, 236, 0, 5, 34, 142, 49, 134, 53, 30, 53, 62, 236, 0, 108, 4, 32, 43, 12, 0, 2, 34, 142, 19, 117, 34, 41, 148, 9, 3, 41, 167, 27, 116, 20, 25, 40, 4, 0, 1, 27, 50, 45, 30, 40, 4, 0, 32, 43, 228, 1, 204, 9, 148, 30, 204, 1, 116, 183, 2, 166, 27, 18, 12, 25, 164, 0, 1, 11, 249, 11, 216, 40, 238, 1, 45, 30, 41, 148, 0, 100, 5, 32, 54, 14, 0, 26, 208, 32, 91, 244, 1, 3, 49, 134, 26, 175, 11, 249, 135, 0, 183, 36, 254, 230, 0, 43, 148, 32, 59, 236, 3, 0, 2, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 49, 134, 26, 109, 3, 249, 3, 217, 17, 0, 0, 13, 3, 151, 36, 254, 36, 254, 36, 254, 36, 254, 35, 214, 41, 233, 49, 134, 32, 73, 4, 0, 11, 34, 44, 3, 184, 3, 118, 36, 253, 36, 254, 35, 148, 42, 10, 32, 73, 220, 1, 228, 13, 5, 34, 142, 19, 83, 35, 18, 41, 200, 252, 1, 32, 0, 0, 0, 0, 255, 29, 0, 255, 128, 0, 32, 87, 132, 20, 145, 15, 255, 32, 0, 0, 0, 0, 0, 0, 0, 0, 63, 245, 1, 0, 32, 203, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0]
    # ml = miniLZO(4096)
    # logging.info("miniLZO init ", ml.is_init(), time.time())

    # st = time.time()
    # logging.info("start time", time.time())
    # barray_locate, barray = ml.minilzo_compress(bytes(l0))
    # barray = list(barray)
    # logging.info("used time", time.time(), time.time()-st)
    # logging.info("{compress out len:\n", len(barray), "locate:", barray_locate, "data:", barray[:10], "}")

    # error_data_index_list = []
    # for i in range(0, len(barray)):
    #     if l1[i] != barray[i]:
    #         error_data_index_list.append(i)
    # logging.info("error:", error_data_index_list)

    # st = time.time()
    # logging.info("start time", time.time())
    # logging.info("l1 len ", len(l1))
    # barray = ml.minilzo_decompress(bytes(barray), [len(barray)])
    # # barray = ml.minilzo_decompress(bytes(l1), [len(l1)])
    # barray = list(barray)
    # logging.info("used time", time.time(), time.time()-st)
    # logging.info("{decompress out len:\n", len(barray), "data:", barray[:10], "}")

    # area_list = [[0,0,32,32],[32,0,64,32],[64,0,96,32],[96,0,128,32],[128,0,160,32],
    #             [0,32,32,64],[32,32,64,64],[64,32,96,64],[96,32,128,64],[128,32,160,64],
    #             [0,64,32,96],[32,64,64,96],[64,64,96,96],[96,64,128,96],[128,64,160,96],
    #             [0,96,32,128],[32,96,64,128],[64,96,96,128],[96,96,128,128],[128,96,160,128]]
    # area_list = [[0,0,64,64],[64,0,128,64],
    #              [0,64,64,128],[64,64,128,128],
    #              [128,0,160,128]]
    # ss = ScreenStream("0.0.0.0", 715, [0,0,2560,1440], [160,128], area_list)
    # # img = ss.grab_screen_to_buffer(0, 0, 160, 128)
    # ss.loop()
